<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
    502 Bad Gateway : Forums : PythonAnywhere
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Forums : PythonAnywhere">
        <meta name="author" content="PythonAnywhere LLP">
        <meta name="google-site-verification" content="O4UxDrfcHjC44jybs2vajc1GgRkTKCTRgVzeV6I9V14" />

        <!-- Le styles -->
        <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/static/anywhere/styles/bootstrap_base.css" rel="stylesheet">
        
    
    <link rel="stylesheet" href="/static/anywhere/styles/forums.css" type="text/css" media="screen" charset="utf-8" />

    <link rel="stylesheet" href="/static/pygments/style.css" type="text/css" media="screen" charset="utf-8" />

        <link rel="stylesheet" href="/static/jquery/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" charset="utf-8" />
        
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/forums/topic/786/rss" />

        <style type="text/css">
            body {
                height: auto;
            }
        </style>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- Le fav and touch icons -->
        <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
    </head>

     <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div id="id_internal_nav_bar_container" class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="/"><img id="id_logo" src="/static/anywhere/images/logo-234x35.png" height="35" title="PythonAnywhere logo" alt="PythonAnywhere logo" /></a>
                    <div class="nav-collapse">
                        <ul id="id_header_links" class="nav">
                            <li><a id="id_feedback_link" class='feedback_link' href="">Send feedback</a></li>
                            <li><a id="id_forums_link" href="/forums/">Forums</a></li>
                            <li><a href="/wiki/" id="id_help_link">Help</a></li>
                            <li><a href="http://blog.pythonanywhere.com/" id="id_blog_link">Blog</a></li>
                            
                            
                                <li><a style="font-weight: bold;" href="/pricing/" id="id_pricing_link">Pricing & signup</a></li>
                                <li><a href="/login/?next=/forums/topic/786/" id="id_login_link">Log in</a></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="top-container" id="id_dummy"></div>

        

        
    
    <div class="container">
        <div class="row">
            <div class="span8 offset3">
                <h1>PythonAnywhere Forums</h1>
            </div>
        </div>



    <div class="row">
        <div class="span8 offset3">
            <p>
                <a href="/forums/start_topic/" id="id_start_new_topic">Start a new topic</a> |
                <a href="/forums/">Back to all topics</a> |
                <a href="/forums/topic/786/rss">This topic's RSS</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span8 offset3 topic">
            <h2>502 Bad Gateway</h2>
        </div>
    </div>

    
        <div class="row">
            <div id="id_post_5574" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5574_content_text" class="span8">
                        <p>My webapp is showing "502 Bad Gateway". There doesn't appear to be anything wrong with it, and it used to work fine. I guess it's something to do with PA. Please fix asap.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5574_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            giorgostzampanakis
                            |
                            37
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5574_created_date">
                            July 24, 2013, 12:19 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5574">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5576" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5576_content_text" class="span8">
                        <p>Checking now...</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5576_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5576_created_date">
                            July 24, 2013, 12:19 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5576">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5577" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5577_content_text" class="span8">
                        <p>Still investigating.  Other sites are OK (apart from an apparently unrelated problem on one other) but there's definitely something odd happening with yours.  One possibility is that it's using more memory than it was previously -- has it changed recently?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5577_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5577_created_date">
                            July 24, 2013, 12:42 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5577">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5578" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5578_content_text" class="span8">
                        <p>Alternatively, have you changed your code so that you're using threads?  The error in your <em>domain</em><code>.server.log</code> files looks like it could be associated with that.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5578_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5578_created_date">
                            July 24, 2013, 12:59 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5578">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5579" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5579_content_text" class="span8">
                        <p>OK, it looks like you updated your web app at 7:30 UTC this morning.  Perhaps you changed it then but didn't see the error until this morning's update to PythonAnywhere forced it to restart?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5579_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5579_created_date">
                            July 24, 2013, 1:02 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5579">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5582" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5582_content_text" class="span8">
                        <p>It's working now. I just re-uploaded my python files. The weird part is that it didn't appear as if there were any changes to the files. Maybe something got corrupted somehow. Thanks for the quick response.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5582_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            giorgostzampanakis
                            |
                            37
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5582_created_date">
                            July 24, 2013, 1:41 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5582">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5586" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5586_content_text" class="span8">
                        <p>Glad it's working now!</p>
<p>That's really odd, though.  If you take a look at your server log files, you'll see that the web workers are failing to start because of this error:</p>
<div class="codehilite"><pre><span class="n">Fatal</span> <span class="n">Python</span> <span class="n">error</span><span class="o">:</span> <span class="n">Couldn</span><span class="err">&#39;</span><span class="n">t</span> <span class="n">create</span> <span class="n">autoTLSkey</span> <span class="n">mapping</span>
</pre></div>


<p>That sounds like your app is trying to create thread local storage, which would imply it's trying to run in some kind of multi-threaded mode. And that doesn't work on PythonAnywhere right now.</p>
<p>Definitely odd.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5586_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5586_created_date">
                            July 24, 2013, 2:50 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5586">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5980" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5980_content_text" class="span8">
                        <p>Guys I am getting this error "502 Bad Gateway". It was perfectly fine an hour ago. There were no code/db changes.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5980_creator_details">
                            
                                
                            
                            vizpoc
                            |
                            5
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5980_created_date">
                            Aug. 19, 2013, 4:44 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5980">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5981" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5981_content_text" class="span8">
                        <p>Its up again. Do we know why this is happening? Is pythonanywhere a reliable host?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5981_creator_details">
                            
                                
                            
                            vizpoc
                            |
                            5
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5981_created_date">
                            Aug. 19, 2013, 4:57 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5981">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5982" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5982_content_text" class="span8">
                        <p>We were alerted, saw what was happening and then fixed it. Outage was caused by the file storage glitching on a webserver so only affected those users who were actually using that machine at the time. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5982_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5982_created_date">
                            Aug. 19, 2013, 5:25 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5982">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5984" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5984_content_text" class="span8">
                        <p>Just to add -- things like that happen pretty rarely (less than once a fortnight) and normally only cause a 5-minute outage for a small number of users.  We're working on getting that even further down.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5984_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5984_created_date">
                            Aug. 19, 2013, 6:17 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/786/#id_post_5984">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    

    




        <div id="id_footer" class="container">

            <footer id="id_copyright_div">
                <p>
                    Copyright &copy; 2013 PythonAnywhere LLP
                    &mdash;
                    <a href="/terms/">Terms</a>
                    &mdash;
                    <a href="/privacy/">Privacy</a><br/>
                    "Python" is a registered trademark of the Python Software Foundation.
                </p>
            </footer>

        </div>

        
        

        <div id="id_feedback_dialog" title="Help us improve" style="display:none">
    <div id="id_feedback_dialog_blurb_big" class="dialog_blurb_big">
        It's always a pleasure to hear from you!
    </div>
    <div id="id_feedback_dialog_blurb_small">
        Ask us a question, or tell us what you love or hate about PythonAnywhere.<br/>
        We'll get back to you over email ASAP.
    </div>
    <textarea id="id_feedback_dialog_text" rows="6"></textarea>
    <input id="id_feedback_dialog_email_address" type="text" class="default_prompt"/>
    <div id="id_feedback_dialog_error" class="pa_hidden">
        Sorry, there was an error connecting to the server. <br/>Please try again in a few moments...
    </div>
    <div class="dialog_buttons">
        <img id="id_feedback_dialog_spinner" src="/static/anywhere/images/spinner-small.gif" />
        <button class="btn btn-primary" id="id_feedback_dialog_ok_button">OK</button>
        <button class="btn" id="id_feedback_dialog_cancel_button">Cancel</button>
    </div>
</div>


        <!-- Le javascript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script type="text/javascript" src="/static/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/static/jquery/jquery-ui-1.8.11.custom.min.js"></script>
        <script src="/static/bootstrap/js/bootstrap-transition.js"></script>
        <script src="/static/bootstrap/js/bootstrap-alert.js"></script>
        <script src="/static/bootstrap/js/bootstrap-modal.js"></script>
        <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tab.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="/static/bootstrap/js/bootstrap-popover.js"></script>
        <script src="/static/bootstrap/js/bootstrap-button.js"></script>
        <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>

        <script type="text/javascript">
            var urls = {};
            var Anywhere = {};
            Anywhere.urls = {};
        </script>
        <script type="text/javascript" src="/static/anywhere/scripts/ajax_utils.js"></script>

        <script type="text/javascript" src="/static/anywhere/scripts/feedback_dialog.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $.extend(
                    urls,
                    {
                        feedback: '/feedback/submit/'
                    }
                );
                
                    Anywhere.FeedbackDialog.Initialise(urls, true);
                
            });
        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-18014859-6']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

        



    </body>
</html>
